package com.shuaitao.myblog.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shuaitao.myblog.bean.Blog;
import com.shuaitao.myblog.mapper.BlogMapper;
import com.shuaitao.myblog.service.BlogService;
import com.shuaitao.myblog.utils.R;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 24820
* @description 针对表【c_blog】的数据库操作Service实现
* @createDate 2023-06-07 16:16:43
*/
@Service
public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog>
    implements BlogService {

    @Override
    public R getBlogList(String userId) {
        List<Blog> blogList = this.list(new QueryWrapper<Blog>().eq("user_id", userId));
        return R.ok().put("blog",blogList);
    }



}




